package com.lwp.springboot.jpa.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "lot_lottery", schema = "timo", catalog = "")
public class LotLotteryEntity {
    private long id;
    private String name;
    private Integer period;
    private Byte type;
    private Byte ball1;
    private Byte ball2;
    private Byte ball3;
    private Byte ball4;
    private Byte ball5;
    private Byte ball6;
    private Byte ball7;
    private String remark;
    private Timestamp createDate;
    private Timestamp updateDate;
    private Byte status;
    private Integer year;
    private Timestamp nextKjDatetime;
    private Integer nextPeriod;
    private Timestamp kjDatetime;
    private Byte kjStatus;
    private Integer createBy;
    private Integer updateBy;

    @Id
    @Column(name = "id", nullable = false)
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name", nullable = true, length = 255)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "period", nullable = true)
    public Integer getPeriod() {
        return period;
    }

    public void setPeriod(Integer period) {
        this.period = period;
    }

    @Basic
    @Column(name = "type", nullable = true)
    public Byte getType() {
        return type;
    }

    public void setType(Byte type) {
        this.type = type;
    }

    @Basic
    @Column(name = "ball1", nullable = true)
    public Byte getBall1() {
        return ball1;
    }

    public void setBall1(Byte ball1) {
        this.ball1 = ball1;
    }

    @Basic
    @Column(name = "ball2", nullable = true)
    public Byte getBall2() {
        return ball2;
    }

    public void setBall2(Byte ball2) {
        this.ball2 = ball2;
    }

    @Basic
    @Column(name = "ball3", nullable = true)
    public Byte getBall3() {
        return ball3;
    }

    public void setBall3(Byte ball3) {
        this.ball3 = ball3;
    }

    @Basic
    @Column(name = "ball4", nullable = true)
    public Byte getBall4() {
        return ball4;
    }

    public void setBall4(Byte ball4) {
        this.ball4 = ball4;
    }

    @Basic
    @Column(name = "ball5", nullable = true)
    public Byte getBall5() {
        return ball5;
    }

    public void setBall5(Byte ball5) {
        this.ball5 = ball5;
    }

    @Basic
    @Column(name = "ball6", nullable = true)
    public Byte getBall6() {
        return ball6;
    }

    public void setBall6(Byte ball6) {
        this.ball6 = ball6;
    }

    @Basic
    @Column(name = "ball7", nullable = true)
    public Byte getBall7() {
        return ball7;
    }

    public void setBall7(Byte ball7) {
        this.ball7 = ball7;
    }

    @Basic
    @Column(name = "remark", nullable = true, length = 255)
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "create_date", nullable = true)
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    @Basic
    @Column(name = "update_date", nullable = true)
    public Timestamp getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Timestamp updateDate) {
        this.updateDate = updateDate;
    }

    @Basic
    @Column(name = "status", nullable = true)
    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    @Basic
    @Column(name = "year", nullable = true)
    public Integer getYear() {
        return year;
    }

    public void setYear(Integer year) {
        this.year = year;
    }

    @Basic
    @Column(name = "next_kj_datetime", nullable = true)
    public Timestamp getNextKjDatetime() {
        return nextKjDatetime;
    }

    public void setNextKjDatetime(Timestamp nextKjDatetime) {
        this.nextKjDatetime = nextKjDatetime;
    }

    @Basic
    @Column(name = "next_period", nullable = true)
    public Integer getNextPeriod() {
        return nextPeriod;
    }

    public void setNextPeriod(Integer nextPeriod) {
        this.nextPeriod = nextPeriod;
    }

    @Basic
    @Column(name = "kj_datetime", nullable = true)
    public Timestamp getKjDatetime() {
        return kjDatetime;
    }

    public void setKjDatetime(Timestamp kjDatetime) {
        this.kjDatetime = kjDatetime;
    }

    @Basic
    @Column(name = "kj_status", nullable = true)
    public Byte getKjStatus() {
        return kjStatus;
    }

    public void setKjStatus(Byte kjStatus) {
        this.kjStatus = kjStatus;
    }

    @Basic
    @Column(name = "create_by", nullable = true)
    public Integer getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Integer createBy) {
        this.createBy = createBy;
    }

    @Basic
    @Column(name = "update_by", nullable = true)
    public Integer getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Integer updateBy) {
        this.updateBy = updateBy;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        LotLotteryEntity that = (LotLotteryEntity) o;
        return id == that.id &&
                Objects.equals(name, that.name) &&
                Objects.equals(period, that.period) &&
                Objects.equals(type, that.type) &&
                Objects.equals(ball1, that.ball1) &&
                Objects.equals(ball2, that.ball2) &&
                Objects.equals(ball3, that.ball3) &&
                Objects.equals(ball4, that.ball4) &&
                Objects.equals(ball5, that.ball5) &&
                Objects.equals(ball6, that.ball6) &&
                Objects.equals(ball7, that.ball7) &&
                Objects.equals(remark, that.remark) &&
                Objects.equals(createDate, that.createDate) &&
                Objects.equals(updateDate, that.updateDate) &&
                Objects.equals(status, that.status) &&
                Objects.equals(year, that.year) &&
                Objects.equals(nextKjDatetime, that.nextKjDatetime) &&
                Objects.equals(nextPeriod, that.nextPeriod) &&
                Objects.equals(kjDatetime, that.kjDatetime) &&
                Objects.equals(kjStatus, that.kjStatus);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, period, type, ball1, ball2, ball3, ball4, ball5, ball6, ball7, remark, createDate, updateDate, status, year, nextKjDatetime, nextPeriod, kjDatetime, kjStatus);
    }
}
